package com.tianji.promotion.service;

import com.tianji.promotion.domain.po.Coupon;
import com.tianji.promotion.domain.po.ExchangeCode;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 兑换码 服务类
 * </p>
 *
 * @author ltd
 * @since 2024-07-02
 */
public interface IExchangeCodeService extends IService<ExchangeCode> {
    /**
     * 将手动领取的兑换码存入redis和数据库
     * @param coupon
     */
    void asyncGenerateCode(Coupon coupon);

    /**
     * 判断兑换吗是否存在
     * @param redeemCodes
     * @param b
     * @return
     */
    Boolean getTheStatusOfTheRedemptionCode(long redeemCodes, boolean b);
}
